negotiator.boaframework.omstrategy
Class NullStrategy

java.lang.Object
  extended by negotiator.boaframework.OMStrategy
      extended by negotiator.boaframework.omstrategy.NullStrategy

public class NullStrategy
extends OMStrategy

Baseline strategy which simply returns a random bid from the given array of bids. Basically, the opponent model is ignored.

Author:
Mark Hendrikx

Field Summary
 
Fields inherited from class negotiator.boaframework.OMStrategy
model, negotiationSession
 
Constructor Summary
NullStrategy()
          Empty constructor used for reflexion.
NullStrategy(NegotiationSession negotiationSession)
          Normal constructor used to initialize the NullStrategy opponent model strategy.
 
Method Summary
 boolean canUpdateOM()
          Returns true if the opponent model be updated, which is in this case if the time is lower than the given threshold.
 BidDetails getBid(java.util.List<BidDetails> allBids)
          Returns a random bid from the give array of similarly preferred bids.
 void init(NegotiationSession negotiationSession, OpponentModel model, java.util.HashMap<java.lang.String,java.lang.Double> parameters)
          Initialize method to be used by the BOA framework.
 
Methods inherited from class negotiator.boaframework.OMStrategy
getBid, getBid, init, setOpponentModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullStrategy

public NullStrategy()
Empty constructor used for reflexion. Note this constructor assumes that init is called next.


NullStrategy

public NullStrategy(NegotiationSession negotiationSession)
Normal constructor used to initialize the NullStrategy opponent model strategy.

Parameters:
negotiationSession - symbolizing the negotiation state.
Method Detail

init

public void init(NegotiationSession negotiationSession,
                 OpponentModel model,
                 java.util.HashMap<java.lang.String,java.lang.Double> parameters)
          throws java.lang.Exception
Description copied from class: OMStrategy
Initialize method to be used by the BOA framework.

Overrides:
init in class OMStrategy
Parameters:
negotiationSession - state of the negotiation.
model - opponent model to which the opponent model strategy applies.
parameters - for the opponent model strategy, for example the maximum update time.
Throws:
java.lang.Exception - thrown when initializing the opponent model strategy fails.

getBid

public BidDetails getBid(java.util.List<BidDetails> allBids)
Returns a random bid from the give array of similarly preferred bids.

Specified by:
getBid in class OMStrategy
Parameters:
allBids - list of similarly preferred bids.
Returns:
random bid from given array.

canUpdateOM

public boolean canUpdateOM()
Returns true if the opponent model be updated, which is in this case if the time is lower than the given threshold.

Specified by:
canUpdateOM in class OMStrategy
Returns:
true if model may be updated.